<template>
  <div>

    <h1>谷粒商城</h1>

    <!-- header -->
    <el-row>
      <el-col :span="5" :push="1">
        <el-image></el-image>
      </el-col>
      <el-col :span="12" :push="1">banner</el-col>
      <el-col :span="5">个人信息</el-col>
    </el-row>

    <el-row>
      <h4>商品列表</h4>
    </el-row>

    <el-row>
      <el-col :span="3" v-for="(o, index) in 4" :key="o" :offset="index > 0 ? 2 : 0">
        <el-card :body-style="{ padding: '0px' }">
          <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" class="image">
          <div style="padding: 14px;">
            <span>好吃的汉堡</span>
            <div class="bottom clearfix">
              <time class="time">{{ currentDate }}</time>
              <el-button type="text" class="button">操作按钮</el-button>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>

    <el-table
        :data="tableData"
        border
        style="width: 100%">
      <el-table-column
          fixed
          prop="id"
          label="编号"
          width="150">
      </el-table-column>
      <el-table-column
          prop="spuName"
          label="姓名"
          width="120">
      </el-table-column>
      <el-table-column
          prop="spuDescription"
          label="省份"
          width="120">
      </el-table-column>
      <el-table-column
          prop="catalogId"
          label="市区"
          width="120">
      </el-table-column>
      <el-table-column
          prop="brandId"
          label="地址"
          width="300">
      </el-table-column>
      <el-table-column
          prop="weight"
          label="邮编"
          width="120">
      </el-table-column>
      <el-table-column
          prop="publishStatus"
          label="邮编"
          width="120">
      </el-table-column>
      <el-table-column
          prop="createTime"
          label="邮编"
          width="120">
      </el-table-column>
      <el-table-column
          prop="updateTime"
          label="邮编"
          width="120">
      </el-table-column>
      <el-table-column
          fixed="right"
          label="操作"
          width="100">
        <template slot-scope="scope">
          <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
          <el-button type="text" size="small">编辑</el-button>
        </template>
      </el-table-column>
    </el-table>

    <el-pagination
        @current-change="handleCurrentChange"
        :page-size="100"
        layout="total, prev, pager, next"
        :total="1000">
    </el-pagination>

  </div>
</template>

<script>
export default {
  name: "AttrListView",
  data() {
    return {
      tableData:[]
    }
  }, methods: {
    list(){
      this.axios.post("http://localhost:9022/spuInfolist").then(res=>{
        this.tableData=res.data.data;
      })
    }
  }, created() {
    this.list();
  }
}
</script>

<style scoped>

</style>